<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>新网</title>
<link href="${rc.contextPath}/common/css/common/common.css"rel="stylesheet" type="text/css" />
<link href="${rc.contextPath}/common/js/thickbox/thickbox.css"rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${rc.contextPath}/common/js/thickbox/jquery.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/thickbox/thickbox.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/jquery/jquery-1.4a2.min.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/jquery/jquery.KinSlideshow-1.1.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/jquery/jquery.KinSlideshow-1.2.1.min.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/config.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/notice.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/main.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/main_info.js"></script>

<script type="text/javascript" src="${rc.contextPath}/common/js/toastr/toastr.js"></script>
<link href="${rc.contextPath}/common/js/toastr/toastr.css"	rel="stylesheet" />

<script type="text/javascript">
$(function(){
	//获取即将到期商品数量
	//getDueSoonGoodsCount(); 
	/* //获取未接收的服务期客户数量
	getAcceptNoServiceCustomerCount(); */
	//获取未接收的新注册客户数量
	//getAcceptNoNewCustomerCount();
	/* //获取未接收的意向客户数量
	getAcceptNoIntentionCustomerCount();
	//获取未接收的二次客户数量
	getAcceptNoTwiceCustomerCount(); */
	//获取未接收的未注册新客户数量
	//getAcceptNonotRegisterNewCustomerCount(); 
	/* //获取即将流走客户数量
	getVanishSoonCustomerCount(); */
	//获取加入购物车会员数量
	//getAddCartCustomCount();
	$("#KinSlideshow").KinSlideshow();
	
	
	
})

function getDueSoonGoodsCount() {
	var rootPath = $('#rootPath').val();
	$.post(
			rootPath + "/customerManage/getDueSoonGoodsCount",
			{},
			function(date) {
				var count = eval(date);
				$('#dueSoonGoods').html(count);
			}
	);
}

function getAcceptNoServiceCustomerCount() {
	var rootPath = $('#rootPath').val();
	customType = ${serviceCustomer};
	 $.post(
			rootPath + "/customerManage/getAcceptNoCustomerCountByCustomType",
			{
				"customType" : customType
			},
			function(date) {
				var count = eval(date);
				$('#serviceCustomer').html(count);
			}
	); 
}

function getAcceptNoNewCustomerCount() {
	var rootPath = $('#rootPath').val();
	customType = ${newCustomer};
	 $.post(
			rootPath + "/customerManage/getAcceptNoCustomerCountByCustomType",
			{
				"customType" : customType
			},
			function(date) {
				var count = eval(date);
				$('#newCustomer').html(count);
			}
	); 
}

function getAcceptNoIntentionCustomerCount() {
	var rootPath = $('#rootPath').val();
	customType = ${intentionCustomer};
	 $.post(
			rootPath + "/customerManage/getAcceptNoCustomerCountByCustomType",
			{
				"customType" : customType
			},
			function(date) {
				var count = eval(date);
				$('#intentionCustomer').html(count);
			}
	); 
}

function getAcceptNoTwiceCustomerCount() {
	var rootPath = $('#rootPath').val();
	customType = ${twiceCustomer};
	 $.post(
			rootPath + "/customerManage/getAcceptNoCustomerCountByCustomType",
			{
				"customType" : customType
			},
			function(date) {
				var count = eval(date);
				$('#twiceCustomer').html(count);
			}
	); 
}

function getAcceptNonotRegisterNewCustomerCount() {
	var rootPath = $('#rootPath').val();
	customType = ${notRegisterNewCustomer};
	 $.post(
			rootPath + "/customerManage/getAcceptNoCustomerCountByCustomType",
			{
				"customType" : customType
			},
			function(date) {
				var count = eval(date);
				$('#notRegisterNewCustomer').html(count);
			}
	); 
}

function getAddCartCustomCount() {
	var rootPath = $('#rootPath').val();
	customType = ${notRegisterNewCustomer};
	$.post(
		rootPath + "/cart/getAddShopCartCount",
		{
		},
		function(date) {
			var count = eval(date);
			$('#addCartCustomCount').html(count);
		}
	); 
}

function getVanishSoonCustomerCount() {
	var rootPath = $('#rootPath').val();
	
	 $.post(
			rootPath + "/customerManage/getVanishSoonCustomerCount",
			{
				
			},
			function(date) {
				var count = eval(date);
				$('#vanishSoonCustomer').html(count);
			}
	); 
	 
	 
}

function MyAutoRun()
{  
　//以下是您的函数的代码，请自行修改先！
　	var rootPath = $('#rootPath').val();

	$.post(
			rootPath + "/customerManage/judgeUnreceptCustomer",
			{
				
			},
			function(data) {
				var status = eval(data);
				if(status=='true'){
					toastr.options = {  
							  
				            closeButton: false,  
				            debug: false,  
				            progressBar: false,  
				            positionClass: "toast-bottom-right",  
				            showDuration: "300",  
				            hideDuration: "50000",  
				            timeOut: "60000",
				            extendedTimeOut: "1000",  
				            showEasing: "swing",  
				            hideEasing: "linear",  
				            showMethod: "fadeIn",  
				            hideMethod: "fadeOut"  
				        };  

					toastr.options.onclick = function(){
						window.open(rootPath+"/page/workbench","mainFrame");
					}
					toastr.info('有新客户了，快去接收吧！'); 
				} else {
					//测试代码
					toastr.options.onclick = function(){
						window.open(rootPath+"/page/workbench","mainFrame");
					}
					toastr.info('有新客户了，快去接收吧！'); 
				}
			}
	);  

}  
var int=self.setInterval("MyAutoRun()",10000);


</script>

</head>

<body>
<input type="hidden" id="rootPath" value="${rc.contextPath}"/>
<input id="rootPath" type="text" value="$ctx" style="display: none" />
<input id="rootPath" type="text" value="${rc.contextPath}" style="display: none" />
		<div class="main">
            <!--右侧主体内容-->
            	<!--首页欢迎语-->
            	<div class="welcome">
                	<ul>
                    	<li>您好，<a  href="${rc.contextPath}/page/empInfo?height=300&amp;width=510" class="thickbox"  title="个人信息" >${currentUser.ename}</a>，今天是<span id="nowDate"></span></li>
                    </ul>
          </div>
                <div class="leftCon">
                	 <!--我的统计-->
                	<!-- <div class="box1 stat">
                	<div class="title1"><strong>我的提醒</strong></div>
                    <div class="con">
                    	<div class="mes1 botLine">
                        	<ul>
                            	<li>有 <a href="#"><span id="serviceCustomer">...</span></a> 条服务期客户要处理&nbsp;<a href="${rc.contextPath}/page/goServiceCustomer">详情</a></li>
                            	
 								<li>有 <a href="#"><span id="dueSoonGoods">...</span></a> 条即将到期客户要处理&nbsp;<a href="${rc.contextPath}/page/goDueSoonCustomer">详情</a></li>
                                <li>有 <a href="#"><span id="newCustomer">...</span></a> 条新注册客户需处理&nbsp;<a href="${rc.contextPath}/page/goNewRegisterCustomer">详情</a></li>
                                <li>有 <a href="#"><span id="notRegisterNewCustomer">...</span></a> 条未注册新客户需处理&nbsp;<a href="${rc.contextPath}/page/goNotRegisterNewCustomer">详情</a></li>
                                <li>有 <a href="#"><span id="addCartCustomCount">...</span></a> 个会员加入购物车&nbsp;<a href="${rc.contextPath}/cart/showPage/1?isFromMain=0">详情</a></li>
                            </ul>
                        </div>
                      	<div class="mes1">
                      		<strong>本月业绩</strong>
                        	<ul>
                        		<li style="padding-top:5px">新开业绩: <a href="#">10</a> 元</li>
                        		<li style="padding-top:5px">续费业绩: <a href="#">10</a> 元</li>
                                <li style="padding-top:5px">单品业绩: </li>
                                <li>com域名&nbsp; <a href="#">10</a> 元</li>
                                <li>cn域名&nbsp;&nbsp; <a href="#">10</a> 元</li>
                                #if($!pushResultsList)
                                <li style="padding-top:5px">意向客户: </li>
                                #end
                                #foreach($pushResults in $pushResultsList)
                                <li>${pushResults.productName}</li>
                                <li>推送个数 <a href="#">${pushResults.pushNumber}</a> 个</li>
                                <li>成交率&nbsp;&nbsp; <a href="#">10</a> %</li>
                                #end
                            </ul>
                            
                        </div>
                    </div>
                </div> -->
                <div  id="KinSlideshow"  style=" visibility:hidden;"> 
                 <a href="#" target="_blank"><img src="${rc.contextPath}/common/images/adv1.png" width="498" height="376" alt="" /></a>
                  <a href="#" target="_blank"><img src="${rc.contextPath}/common/images/adv2.png" width="498" height="376" alt="" /></a>
                   <a href="#" target="_blank"><img src="${rc.contextPath}/common/images/adv3.png" width="498" height="376" alt="" /></a>
                <a href="#" target="_blank"><img src="${rc.contextPath}/common/images/adv4.png" width="498" height="376" alt="" /></a>
                   <a href="#" target="_blank"><img src="${rc.contextPath}/common/images/adv5.png" width="498" height="376" alt="" /></a>
                 <a href="#" target="_blank"><img src="${rc.contextPath}/common/images/adv6.png" width="498" height="376" alt="" /></a>
                </div>
                	<!--<a class="adv" href="#"></a>-->
                </div>
                
                <div class="rightCon">
               	<!--公司动态-->
                <div class="box1 trend">
                	<div class="title1"><strong>政策公告</strong><a href="${rc.contextPath}/notice/policy/1" class="right">更多&gt;&gt;</a></div>
                    <div class="con">
                    	<ul id="policyUl" class="uList1">
                        </ul>
                    </div>
                </div>
                <!--最新6条消息-->
                <div class="box1 trend">
                	<div class="title1"><strong>最新消息</strong><a href="${rc.contextPath}/notice/msg/1" class="right">更多&gt;&gt;</a></div>
                    <div class="con">
                    	<ul id="msgUl" class="uList1">
                        </ul>
                    </div>
                </div>
               </div> 
                
                
        	<!--右侧主体内容end-->
        <div class="clear">&nbsp;</div>
        </div>
</body>
</html>
